﻿using System;
namespace Kis.Xroad.Eu {
    
    
    [System.SerializableAttribute()]
    public partial class Employee {
        
        private string @__firstName;
        
        private string @__lastName;
        
        private int @__age;
        
        private global::Kis.Xroad.Eu.Gender @__genger;
        
        private Employee.BirthDateType @__birthDate;
        
        private decimal @__salary;
        
        private global::Kis.Xroad.Eu.Employee @__employer;
        
        private Employee.DepartmentType @__department;
        
        private System.Collections.Generic.List<global::Kis.Xroad.Eu.WorkDay> @__daysOff = new System.Collections.Generic.List<global::Kis.Xroad.Eu.WorkDay>();
        
        private System.Collections.Generic.List<global::Kis.Xroad.Eu.Employee> @__subordinates = new System.Collections.Generic.List<global::Kis.Xroad.Eu.Employee>();
        
        private System.Collections.Generic.List<Employee.RolesType> @__roles = new System.Collections.Generic.List<Employee.RolesType>();
        
        private System.Collections.Generic.List<Employee.ManagedRegionsType> @__managedRegions = new System.Collections.Generic.List<Employee.ManagedRegionsType>();
        
        public Employee() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public Employee(string @firstName, string @lastName, int @age, global::Kis.Xroad.Eu.Gender @genger, Employee.BirthDateType @birthDate, decimal @salary, global::Kis.Xroad.Eu.Employee @employer, Employee.DepartmentType @department, System.Collections.Generic.List<global::Kis.Xroad.Eu.WorkDay> @daysOff, System.Collections.Generic.List<global::Kis.Xroad.Eu.Employee> @subordinates, System.Collections.Generic.List<Employee.RolesType> @roles, System.Collections.Generic.List<Employee.ManagedRegionsType> @managedRegions) {
            this.@__firstName = @firstName;
            this.@__lastName = @lastName;
            this.@__age = @age;
            this.@__genger = @genger;
            this.@__birthDate = @birthDate;
            this.@__salary = @salary;
            this.@__employer = @employer;
            this.@__department = @department;
            this.@__daysOff = @daysOff;
            this.@__subordinates = @subordinates;
            this.@__roles = @roles;
            this.@__managedRegions = @managedRegions;
        }
        
        /// <summary>
        /// Required parameters
        /// </summary>
        public Employee(string @firstName, string @lastName, int @age, global::Kis.Xroad.Eu.Gender @genger, Employee.BirthDateType @birthDate, decimal @salary, Employee.DepartmentType @department, System.Collections.Generic.List<global::Kis.Xroad.Eu.WorkDay> @daysOff, System.Collections.Generic.List<Employee.ManagedRegionsType> @managedRegions) {
            this.@__firstName = @firstName;
            this.@__lastName = @lastName;
            this.@__age = @age;
            this.@__genger = @genger;
            this.@__birthDate = @birthDate;
            this.@__salary = @salary;
            this.@__department = @department;
            this.@__daysOff = @daysOff;
            this.@__managedRegions = @managedRegions;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected Employee(Employee @employee) {
            this.@__firstName = @employee.FirstName;
            this.@__lastName = @employee.LastName;
            this.@__age = @employee.Age;
            this.@__genger = @employee.Genger;
            this.@__birthDate = @employee.BirthDate;
            this.@__salary = @employee.Salary;
            this.@__employer = @employee.Employer;
            this.@__department = @employee.Department;
            this.@__daysOff = @employee.DaysOff;
            this.@__subordinates = @employee.Subordinates;
            this.@__roles = @employee.Roles;
            this.@__managedRegions = @employee.ManagedRegions;
        }
        
        public virtual string FirstName {
            get {
                return this.@__firstName;
            }
            set {
                this.@__firstName = value;
            }
        }
        
        public virtual string LastName {
            get {
                return this.@__lastName;
            }
            set {
                this.@__lastName = value;
            }
        }
        
        public virtual int Age {
            get {
                return this.@__age;
            }
            set {
                this.@__age = value;
            }
        }
        
        public virtual global::Kis.Xroad.Eu.Gender Genger {
            get {
                return this.@__genger;
            }
            set {
                this.@__genger = value;
            }
        }
        
        public virtual Employee.BirthDateType BirthDate {
            get {
                return this.@__birthDate;
            }
            set {
                this.@__birthDate = value;
            }
        }
        
        public virtual decimal Salary {
            get {
                return this.@__salary;
            }
            set {
                this.@__salary = value;
            }
        }
        
        public virtual global::Kis.Xroad.Eu.Employee Employer {
            get {
                return this.@__employer;
            }
            set {
                this.@__employer = value;
            }
        }
        
        public virtual Employee.DepartmentType Department {
            get {
                return this.@__department;
            }
            set {
                this.@__department = value;
            }
        }
        
        public virtual System.Collections.Generic.List<global::Kis.Xroad.Eu.WorkDay> DaysOff {
            get {
                return this.@__daysOff;
            }
            set {
                this.@__daysOff = value;
            }
        }
        
        public virtual System.Collections.Generic.List<global::Kis.Xroad.Eu.Employee> Subordinates {
            get {
                return this.@__subordinates;
            }
            set {
                this.@__subordinates = value;
            }
        }
        
        public virtual System.Collections.Generic.List<Employee.RolesType> Roles {
            get {
                return this.@__roles;
            }
            set {
                this.@__roles = value;
            }
        }
        
        public virtual System.Collections.Generic.List<Employee.ManagedRegionsType> ManagedRegions {
            get {
                return this.@__managedRegions;
            }
            set {
                this.@__managedRegions = value;
            }
        }
        
        [System.SerializableAttribute()]
        public partial class DepartmentType {
            
            private string @__country;
            
            private int @__floor;
            
            public DepartmentType() {
            }
            
            /// <summary>
            /// All parameters
            /// </summary>
            public DepartmentType(string @country, int @floor) {
                this.@__country = @country;
                this.@__floor = @floor;
            }
            
            /// <summary>
            /// Copy Constructor
            /// </summary>
            protected DepartmentType(DepartmentType @departmentType) {
                this.@__country = @departmentType.Country;
                this.@__floor = @departmentType.Floor;
            }
            
            public virtual string Country {
                get {
                    return this.@__country;
                }
                set {
                    this.@__country = value;
                }
            }
            
            public virtual int Floor {
                get {
                    return this.@__floor;
                }
                set {
                    this.@__floor = value;
                }
            }
        }
        
        [System.SerializableAttribute()]
        public partial class ManagedRegionsType {
            
            private string @__country;
            
            private int @__city;
            
            private int @__street;
            
            public ManagedRegionsType() {
            }
            
            /// <summary>
            /// All parameters
            /// </summary>
            public ManagedRegionsType(string @country, int @city, int @street) {
                this.@__country = @country;
                this.@__city = @city;
                this.@__street = @street;
            }
            
            /// <summary>
            /// Copy Constructor
            /// </summary>
            protected ManagedRegionsType(ManagedRegionsType @managedRegionsType) {
                this.@__country = @managedRegionsType.Country;
                this.@__city = @managedRegionsType.City;
                this.@__street = @managedRegionsType.Street;
            }
            
            public virtual string Country {
                get {
                    return this.@__country;
                }
                set {
                    this.@__country = value;
                }
            }
            
            public virtual int City {
                get {
                    return this.@__city;
                }
                set {
                    this.@__city = value;
                }
            }
            
            public virtual int Street {
                get {
                    return this.@__street;
                }
                set {
                    this.@__street = value;
                }
            }
        }
        
        [System.SerializableAttribute()]
        public class BirthDateType : global::Xtee.Core.Schema.XsdDateTime {
            
            public BirthDateType(System.DateTime value) : 
                    base(value) {
                this.Validate();
            }
            
            public BirthDateType(string value) : 
                    base(value) {
                this.Validate();
            }
            
            public BirthDateType() : 
                    base(new System.DateTime()) {
            }
            
            public static bool TryParse(string value, out BirthDateType result) {
                try {
                    result = new BirthDateType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator DateTime (BirthDateType value) {
                return value.Value;
            }
            
            public static implicit operator BirthDateType (System.DateTime value) {
                return new BirthDateType(value);
            }
        }
        
        [System.SerializableAttribute()]
        public class RolesType : global::Xtee.Core.Schema.XsdString {
            
            public const string EXECUTIVE = "Executive";
            
            public const string PARKATTENDANT = "ParkAttendant";
            
            public const string PROGRAMMER = "Programmer";
            
            public const string PROJECTMANAGER = "ProjectManager";
            
            public RolesType(string value) : 
                    base(value) {
                this.Validate();
                string annot = null;
                if (Value == "Executive") {
                    annot = "Executive";
                }
                if (Value == "ParkAttendant") {
                    annot = "ParkAttendant";
                }
                if (Value == "Programmer") {
                    annot = "Programmer";
                }
                if (Value == "ProjectManager") {
                    annot = "ProjectManager";
                }
                if (annot!=null) {
                    this._annotation = annot;
                }
                else {
                    throw new global::Xtee.Core.Types.XteeSimpleTypeValidationException(string.Format("Enumeration on [{0}] does not allow value : [{1}] ", this.GetType().Name,Value.ToString()));;
                }
            }
            
            public RolesType() : 
                    base(string.Empty) {
            }
            
            public static bool TryParse(string value, out RolesType result) {
                try {
                    result = new RolesType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator String (RolesType value) {
                return value.Value;
            }
            
            public static implicit operator RolesType (string value) {
                if (value==null) {
                    return null;
                }
                return new RolesType(value);
            }
        }
    }
}
